<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="estilo.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ingreso de Representantes</title>

<style type="text/css">
<!--
.Estilo1 {color: #006699}
.tablita {
	border: thin solid #666666;
}
-->
</style>

<script>
	function validar(){
		var codrepre = document.frmRepre.txt_codRepre.value;
		var coddoc = document.frmRepre.cmb_documento.value;
		var numdoc = document.frmRepre.txt_numdoc.value;
		var nombre = document.frmRepre.txt_nombre.value;
		var pat = document.frmRepre.txt_ape_pat.value;
		var mat = document.frmRepre.txt_ape_mat.value;
		var cliente = document.frmRepre.txt_cod_cli.value;
		
		
	if (mat=="") 
	{
		alert("Ingrese el materno...");
		return false;
	}
	
	if (pat=="") 
	{
		alert("Ingrese el apellido...");
		return false;
	}
		
	if (nombre=="") 
	{
		alert("Ingrese el nombre...");
		return false;
	}
	
	
	if (codrepre=="") 
	{
		alert("Ingrese su codigo de representante...");
		return false;
	}
	
	 
	if (coddoc=="")
	{
		alert("seleccione tipo de documento...");
		return false;
	}
	
	
	if (numdoc=="")
	{
		alert("Ingrese numero de documento...");
		return false;
	}
	
	return true;
	
	
	}
	
	
	
	
	
	</script>

</head>
<body>

<h1  >Registro de Representante</h1>
<hr>

<br>
	<form method="post" name="frmRepre" action="RepresentanteServlet" onsubmit="return validar();">
	<table width="589" height="288"  border = "0" align="center"  cellpadding="1"
			cellspacing="0" class="tablita">
	<tr>
	  <td width="103" height="44" style="height: 8px; " align="right">Codigo:</td>
	  <td colspan="3" style="height: 14px; "><input type="text" name="txt_codRepre" style="height: 17px; "></td>    
	<tr>
	<td height="46" style="height: 13px; " align="right">Documento:</td>
	<td colspan="3" style="height: 16px; "><select name="cmb_documento" id="cmb_documento" style="height: 20px; ">
	  <option value="1">Dni</option>
	  <option value="2">Ruc</option>
	  <option value="3">C.E.</option>
	  <option value="4">Otros_______</option>
					</select>
	  <input type="text" name="txt_numdoc" style="height: 17px; "/></td>
	</tr>
	
	<tr>
	  <td height="44" style="height: 12px; " align="right">Nombres:</td>
	  <td colspan="3" style="height: 11px; "><input type="text" name="txt_nombre" style="width:200px; height: 17px" /></td>
	  <tr>
	<td height="42" style="height: 7px; " align="right">Ape. Paterno:</td>
	<td height="44" width="145" style="height: 22px; "><input type="text" name="txt_ape_pat" style="height: 20px; "></td>
	<td height="44" width="87" style="height: 15px; width: 91px">Ape. Materno:</td>
	<td height="44" width="156" style="height: 21px; "><input type="text" name="txt_ape_mat" style="height: 20px; "></td>
</tr>
	<tr>
	  <td style="height: 13px; " align="right">Cod. Cliente:</td>
	  <td style="height: 14px; "><input type="text" name="txt_cod_cli" style="height: 20px; "></td>
	<td style="height: 20px; "><div align="right">Grupo:</div></td>
		<td style="height: 16px; ">
		  <input name="rbg" type="radio" value="a" checked="checked" />
		  A
		  <input name="rbg" type="radio" value="b" />
		  B
		  <input name="rbg" type="radio" value="c" />
		  C
		  </td>
	</tr>
	<tr><td style="height: 14px; " align="right" >Cargo:</td>
		<td colspan="3" style="height: 16px; "> 
		<input type="text" name="txt_cargo" style="height: 20px; "> </td></tr>
	<tr><td height="46" colspan="4" align="center">
	<input type="submit" value="Grabar Datos" name="btn_grabar">
	<input type="button" name="btn_regRepe" value="Regresar" 
		onclick="window.location='ListarRepre.jsp' "/>
			

	</td></tr>
	</table>
	 
	
	
	</form>
</body>
</html>